package cn.youfule.dp.factory.beanFactory;

import java.io.IOException;
import java.util.Properties;

public class Test {

	public static void main(String[] args) {
		Properties prop = new Properties();
		try {
			prop.load(Test.class.getClassLoader().getResourceAsStream("cn/youfule/dp/factory/beanFactory/spring.properties"));
			String vehicleTypeName = prop.getProperty("VehicleType");
			System.out.println(vehicleTypeName);
			Object o = Class.forName(vehicleTypeName).newInstance();
			Moveable m = (Moveable)o;
			m.run();
		} catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
